//
//  HMHomeTEDBookCell.m
//  HowToDo
//
//  Created by 胡坤 on 2017/1/4.
//  Copyright © 2017年 KY. All rights reserved.
//

#import "HMHomeTEDBookCell.h"
#import "HTDEveryDayBook.h"
#import <UIImageView+WebCache.h>
@interface HMHomeTEDBookCell ()
@property (weak, nonatomic) IBOutlet UIView *backGroundView;
@property (weak, nonatomic) IBOutlet UIImageView *smallIconView;
@property (weak, nonatomic) IBOutlet UIImageView *bigIconView;
@property (weak, nonatomic) IBOutlet UILabel *readerNameLable;
@property (weak, nonatomic) IBOutlet UILabel *contentLable;
@property (weak, nonatomic) IBOutlet UILabel *readerIntroduceLable;
@property (weak, nonatomic) IBOutlet UILabel *priceLable;
@end

@implementation HMHomeTEDBookCell
-(void)awakeFromNib
{
    [super awakeFromNib];
    
    CALayer *layer = [self.backGroundView layer];
    
    [layer setBorderWidth:0.5];
    
    [layer setBorderColor:[UIColor lightGrayColor].CGColor];
    
    [layer setMasksToBounds:YES];
    
}

- (IBAction)buyButtonClick:(id)sender
{
}

-(void)setEdBook:(HTDEveryDayBook *)edBook
{
    _edBook = edBook;
    [self.smallIconView sd_setImageWithURL:[NSURL URLWithString:edBook.reader_header_url]];
    [self.bigIconView sd_setImageWithURL:[NSURL URLWithString:edBook.image_url]];
    self.readerNameLable.text = edBook.reader_name;
    self.contentLable.text = edBook.resource_content;
    self.readerIntroduceLable.text = edBook.reader_introduce;
}

@end
